import { _decorator, Component, Node, Prefab, instantiate } from "cc";
const { ccclass, property } = _decorator;
import { StateBase } from "../Base/StateBase";
import { BulletEnum } from "../Enum/BulletEnum";
import DataManager from "../Runtime/DataManager";
import { BaseBullet } from "../BaseBullet";
@ccclass("SpeedBulletState")
export class SpeedBulletState extends StateBase<BulletEnum> {
  constructor(prefab: Prefab) {
    super();
    this.prefab = prefab;
    this.player = DataManager.Instance.player;
    this.bulletParent = DataManager.Instance.bulletParent;
  }
  prefab: Prefab;
  player: Node;
  bulletParent: Node | null = null;
  private shootTimer: number = 0;
  private shootInterval: number = 1; // 射击间隔时间
  // 子弹数量
  static bulletNumber: number = 1;
  public get state(): BulletEnum {
    return BulletEnum.More;
  }
  public beforeEnter(): void {
    console.log("进入子弹加速状态前");
  }
  public enter(): void {
    console.log("进入子弹加速状态");
  }
  public exit(): void {}
  public update(deltaTime: number): void {
  }
}
